//
//  SingerCollectionViewCell.m
//  海角音乐
//
//  Created by dllo on 15/8/14.
//  Copyright (c) 2015年 杨元石. All rights reserved.
//

#import "SingerCollectionViewCell.h"
#import "DEFINE.h"

@implementation SingerCollectionViewCell

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    
    if (self) {
        
        self.backgroundColor = [UIColor clearColor];
        _imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height-20)];
        

        _imageView.layer.masksToBounds = YES;
        _imageView.layer.cornerRadius = 100*ADJUSTWIDTH*0.06;
        [self addSubview:_imageView];
        [_imageView release];
        
        _title = [[UILabel alloc] initWithFrame:CGRectMake(0, _imageView.frame.size.height, self.frame.size.width, 20)];
        _title.font = [UIFont boldSystemFontOfSize:14];
        _title.textColor = [UIColor whiteColor];
        [self addSubview:_title];
        [_title release];
        
    }
    return self;
}

- (void)getDataModel:(SingerModel *)singerModel
{
    
    [_imageView sd_setImageWithURL:[NSURL URLWithString:singerModel.pic_url] placeholderImage:[UIImage imageNamed:@"touxiang.jpg"]];
    
    _title.text = singerModel.title;
    
}

@end
